package com.gx.recruitment.service.impl;

import com.gx.recruitment.entity.User_favorites;
import com.gx.recruitment.entity.User_favoritesExample;
import com.gx.recruitment.mapper.User_favoritesMapper;
import com.gx.recruitment.service.User_favoritesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class User_favoritesServiceImpl implements User_favoritesService {
    @Resource
    private User_favoritesMapper user_favoritesMapper;

    @Override
    public int insertFavorites(User_favorites record) {
        user_favoritesMapper.insert(record);
        return 0;
    }

    @Override
    public List<User_favorites> selectByJobIdandUserId(User_favoritesExample example) {
        return user_favoritesMapper.selectByExample(example);
    }

    @Override
    public List<User_favorites> selectFavorites(User_favoritesExample example) {
        return user_favoritesMapper.selectByExample(example);
    }

    @Override
    public int deleteByfavoritesId(Integer favoritesId) {
        user_favoritesMapper.deleteByPrimaryKey(favoritesId);
        return 0;
    }

    @Override
    public int deleteByJobId(User_favoritesExample example) {
        user_favoritesMapper.deleteByExample(example);
        return 0;
    }


}
